Part Number Hot Search : 
S0MCF2PC FC6155 2N540 520003 05DB2 8ETU04 50110 ZMY75
Product Description
Full Text Search
 

To Download LK202-25-USB Datasheet File

  If you can't view the Datasheet, Please click here to try to view without PDF Reader .  
 
 


  Datasheet File OCR Text:
  LK202-25-USB technical manual revision: 1.1
contents contents ii 1 getting started 1 1.1 display options available . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 1.2 accessories . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 1.3 features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 1.4 connecting to a pc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 1.5 installing the software . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 1.5.1 drivers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 1.5.2 uproject . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 2 hardware information 6 2.1 power connector . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 2.2 keypad interface connector . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 2.3 manual override . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 2.4 usb header . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 2.5 serial header . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 2.6 general purpose outputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 2.7 dallas 1-wire bridge . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 2.8 protocol select jumpers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 3 troubleshooting 12 3.1 the display does not turn on when power is applied. . . . . . . . . . . . . . . . . . . . . . . 12 3.2 the display module is not communicating. . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 3.3 the display module is communicating, however text canno t be displayed. . . . . . . . . . . 13 4 communications 13 4.1 introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 4.1.1 i 2 c communication summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 3 4.1.2 i 2 c transaction example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 4.1.3 serial communication . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 4.1.4 usb communication . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 4.2 changing the i 2 c slave address . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 4.3 changing the baud rate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 4.4 setting a non-standard baud rate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 5 text 17 5.1 introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 5.1.1 character set . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 5.1.2 control characters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 5.2 auto scroll on . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 5.3 auto scroll off . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 5.4 clear screen . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 5.5 changing the startup screen . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 matrix orbital LK202-25-USB ii
5.6 set auto line wrap on . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 5.7 set auto line wrap off . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 5.8 set cursor position . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 5.9 go home . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 5.10 move cursor back . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 5.11 move cursor forward . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 5.12 underline cursor on . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 5.13 underline cursor off . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 5.14 blinking block cursor on . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 5.15 blinking block cursor off . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 6 special characters 23 6.1 introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 6.2 creating a custom character . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 6.3 saving custom characters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 6.4 loading custom characters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 6.5 save startup screen custom characters . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 6.6 initialize medium number . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 6.7 place medium numbers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 6.8 initialize horizontal bar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 6.9 place horizontal bar graph . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 6.10 initialize narrow vertical bar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 6.11 initialize wide vertical bar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 6.12 place vertical bar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 7 general purpose output 29 7.1 introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 7.2 general purpose output off . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 7.3 general purpose output on . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 7.4 set startup gpo state . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 8 dallas 1-wire 30 8.1 introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 8.2 search for a 1-wire device . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 8.3 dallas 1-wire transaction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 9 keypad 32 9.1 introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 9.2 auto transmit key presses on . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 9.3 auto transmit key presses off . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 9.4 poll key press . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 9.5 clear key buffer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 9.6 set debounce time . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 9.7 set auto repeat mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 9.8 auto repeat mode off . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 9.9 assign keypad codes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36 matrix orbital LK202-25-USB iii
10 display functions 36 10.1 introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36 10.2 display on . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36 10.3 display off . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37 10.4 set brightness . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37 10.5 set and save brightness . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37 10.6 set contrast . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38 10.7 set and save contrast . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38 11 data security 39 11.1 introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 11.2 set remember . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 11.3 data lock . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 11.4 set and save data lock . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 11.5 write customer data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42 11.6 read customer data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42 12 miscellaneous 42 12.1 introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42 12.2 read version number . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42 12.3 read module type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43 13 command summary 45 13.1 communications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45 13.2 text . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45 13.3 special characters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46 13.4 general purpose output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47 13.5 dallas 1-wire . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47 13.6 keypad . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47 13.7 display functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48 13.8 data security . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48 13.9 miscellaneous . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49 13.10command by number . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49 14 appendix 51 14.1 speci?cations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 14.1.1 environmental . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 14.1.2 electrical . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 14.2 optical characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 14.3 physical layout . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53 14.4 ordering information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54 14.5 de?nitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54 14.6 contacting matrix orbital . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55 14.7 revision history . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55 matrix orbital LK202-25-USB iv
1 getting started the LK202-25-USB is an intelligent lcd display designed to d ecrease development time by providing an instant solution to any project. with the ability to commu nicate via usb protocol, the versatile lk202- 25-usb can be easliy interfaced to any pc or usb device. the ea se of use is further enhanced by an intuitive command structure to allow display settings such as backlight brightness, contrast and baud rate to be software controlled. additionally, up to thirty-two cus tom characters such as character sets for bar graphs, medium, and large numbers may be stored in the non-volatile m emory to be easily recalled and displayed at any time. 1.1 display options available the LK202-25-USB comes in a wide variety of colors, and an ext ended temperature option is also available, to allow you to select the display which will best ?t your project needs. these options can be found on our e-commerce website at http://www.matrixorbit al.com. to contact a sales associate for more information on any of these options, see section 14.6 on page 55 for contact information. 1.2 accessories note matrix orbital provides all the interface accessories need ed to get your display up and running. you will ?nd these accessories and others on o ur e-commerce website at http://www.matrixorbital.com. to contact a sales associa te see section 14.6 on page 55 for contact information. matrix orbital LK202-25-USB 1
figure 1: 3ft mini-b usb figure 2: keypad mountings matrix orbital LK202-25-USB 2
figure 3: mounting kits figure 4: 4x4 keypad 1.3 features ? 20 column by 2 line alphanumeric liquid crystal display ? usb communication protocol ? six, 5v -20ma, general purpose outputs for a variety of appli cations ? lightning fast communication speeds, up to 115.2 kbps ? default 19.2 kbps serial communication speed ? extended temperature option available for extreme environ ments of -20c to 70c ? built in font with provision for up to 8 user de?ned character s ? standard dallas one-wire bus that is capable of communicati ng with up to 32 matrix orbital LK202-25-USB 3
? fully buffered so that no delays in transmission are ever nec essary ? ability to add a customized splash / startup screen ? software controlled contrast and brightness with con?gura ble time-out setting up to 90 minutes ? use of up to a 25 key keypad with a 10 key buffer ? horizontal or vertical bar graphs ? fits matrix orbital's mountings without any modi?cations 1.4 connecting to a pc the LK202-25-USB connects seamlessly to a pc and it is an exce llent means of testing the functionality. to connect your display to a pc, you will require a usb cable su ch as the one pictured in ?gure 1 on page 2 . 1. in order to connect your usb display to a personal computer simply plug the mini-b usb cable from the pc to the usb connector on the display. note the LK202-25-USB unit can also be powered via a standard pc po wer cable, shown in ?gure 5. figure 5: alternate display power cable 1.5 installing the software 1.5.1 drivers in order to communicate with any matrix orbital usb display, the proper drivers for the unit must ?rst be correctly installed on the controlling pc or device. to pr eform this operation, follow the steps listed matrix orbital LK202-25-USB 4
below: 1. go to the website location: http://www.matrixorbital.c a/drivers/ 2. download or copy the appropriate usb drivers into a direct ory. 3. uncompress the ?les. they will be a self extracting zip ?le . 4. connect the usb cable to the display and the computer. 5. windows will give a prompt for drivers for a usb , serial dev ice. 6. select 'specify location', and navigate to the directory the ?le was uncompressed to. 7. test the display using a software tool such as uproject. 1.5.2 uproject uproject was designed by matrix orbital to provide a simple a nd easy to use interface that will allow you to test all of the features of our alpha numeric displays. to install uproject from the matrix orbital website, follow the following steps: 1. go to the website location: http://www.matrixorbital.c a/software/software_alpha/uproject/ 2. click on download here 3. locate the ?le uproject.exe on your desktop 4. double click on uproject.exe be sure to check the information selected in the com setup the ?rst time uproject is run. although the display is connected via a usb cable, it will create its own, v irtual, comport which will be displayed in the uproject environment. once this information is entered correctly the program can be used to control all functions of the graphic display. comport the virtual serial port the display has created. baudrate the communication speed the display module is set to. (default 19,200) figure 6: uproject settings matrix orbital LK202-25-USB 5
2 hardware information refer to the following diagram for this chapter: 1 power connector 5 optional serial header 2 keypad header 6 gpos 3 manual override 7 optional dallas 1-wire bridge 4 usb header 8 protocol select jumpers figure 7: LK202-25-USB 2.1 power connector the LK202-25-USB provides a power connector to allow the device to be powered externally. this connector can be coupled to the standard 4-wire power connec tor available in most pc power supplies. in order to power the device externally, you must remove one of t he usb protocol select jumpers. the jumper to remove is the leftmost usb jumper as seen if ?gure 15. matrix orbital LK202-25-USB 6
pin 1 nc pin 2 gnd pin 3 gnd pin 4 +5v figure 8: alternate power connector 2.2 keypad interface connector the LK202-25-USB provides a keypad interface connector which allows for up to a ?ve by ?ve matrix style keypad to be directly connected to the display module. the leftmost pin is connected to the ground reference for the unit, and can be used as a grounding connect ion for an attached keypad. in addition, the rightmost pin is also a ground pin by default, but is selectab le as either ground or 5v power. key presses are generated when a short is detected between a row and a column. when a key press is generated a character, which is associated with the particular key press, is automa tically sent on the tx communication line. the character that is associated with each key press may be alter ed using the assign key codes command, for more detailed information see the keypad section, on page 32 . figure 9: keypad interface connector matrix orbital LK202-25-USB 7
2.3 manual override the manual override is provided to allow the LK202-25-USB to be reset to factory d efaults. this can be particularly helpful if the display module has been set to an unknown baud rate and you are no longer able to communicate with it. if you wish to return the module t o its default settings you must: 1. power off the display module. 2. place a jumper on the manual override pins. 3. power up the display module. 4. the display module is now set to its default values listed b elow in table 1 . 5. edit and save settings. figure 10: manual override jumper table 1: default values brightness 255 contrast 128 baud rate 19.2 kbps note the display module will revert back to the old settings once t urned off, unless the settings are saved. matrix orbital LK202-25-USB 8
2.4 usb header the usb header provides usb connector for communication and power of the di splay. an alternate power option for the display can be seen in ?gure 8 figure 11: usb header table 2: power requirements standard supply voltage +5vdc 0.25v supply current 50ma (backlight off) backlight current 185ma (backlight on) warnings ? do not apply any power with reversed polarization. ? do not apply any voltage other than the speci?ed voltage. 2.5 serial header the LK202-25-USB also offers an alternative, serial header option to permit serial communication with the device. please note the the display normally does not com e with the serial header , it will have to be ordered as a custom. please talk to your sales representativ e if you would like this option. matrix orbital LK202-25-USB 9
figure 12: serial header note this component is optional and must be custom ordered 2.6 general purpose outputs a unique feature of the LK202-25-USB is the ability to contro l relays and other external devices using a general purpose output , which can provide up to 20 ma of current and +5vdc from the pos itive side of the gpo. this is limited by a 240 ohm resistor which is located to the above right of the gpos as pictured below in ?gure 13 . if the device, which is being driven by a gpo, requires a rela tively high current (such as a relay) and has an internal resistance of its own greater tha n 250 ohms, then the 240 ohm resistor may be removed and replaced with a jumper. gnd ground (0vdc) gpo +5vdc at 20 ma figure 13: general purpose output matrix orbital LK202-25-USB 10
warning if connecting a relay, be sure that it is fully clamped using a diode and capacitor in order to absorb any electro-motive f orce (emf) which will be generated. 2.7 dallas 1-wire bridge in addition to the six general purpose outputs the lk202-25- usb offers a standard dallas one-wire bridge, to allow for an aditional thirty two 1-wire devices t o be connected to the display. figure 14: dallas 1-wire bridge note this component is optional and must be custom ordered 2.8 protocol select jumpers the protocol select jumpers , pictured below in ?gure 15 , provide the means necessary to toggle the display module between usb power and external power. as a def ault, the jumpers are set to usb mode with solder jumps on the usb jumpers. in order to place the dis play module in external power mode you must ?rst remove the leftmost solder jump from the usb jumper s, as shown in ?gure 15. the display cannot be used in rs232, ttl, or i2c mode. matrix orbital LK202-25-USB 11
figure 15: protocol select jumpers 3 troubleshooting 3.1 the display does not turn on when power is applied. ? first, check the usb cable which you are using for continuity. if you don't have an ohm me ter, try using a different usb cable , if this does not help try using a different power supply. ? second, ensure that the correct drivers are properly instal led. for the latest drivers, visit the matrix or- bital website at http://www.matrixorbital.ca/drivers/. if you require additional support to resolve this matter, please contact matrix orbital using one of the mehod s described in section 14.6 on page 55 . ? the last step will be to check the usb cable on the LK202-25-USB. if the usb cable has become loose, or you are unable to resolve the issue, please contact matrix orbital, see section 14.6 on page 55 for contact information. 3.2 the display module is not communicating. ? first, ensure that the host system and display module are bot h communicating on the same baud rate. the default baud rate for the display module is 19200 bps. ? finally, you may reset the display to it's default settings u sing the manual override jumper , see section 2.3 on page 8 . matrix orbital LK202-25-USB 12
3.3 the display module is communicating, however text canno t be displayed. ? a common cause may be that the contrast settings have been set to low. the solution to this problem is to adjust the contrast settings. the default setting that will work in most environments is 128. note optimal contrast settings may vary according to factors suc h as temperature, view- ing angle and lighting conditions. if you are unable to resolve any issue please contact matrix o rbital. see 14.6 on page 55 for contact information. 4 communications 4.1 introduction the commands listed in this chapter describe how to con?gure data ?ow on the LK202-25-USB. 4.1.1 i 2 c communication summary the LK202-25-USB is capable of communicating at 100 khz in i 2 c mode, with 127 units addressable on a single i 2 c communication line. however, in order to communicate via i 2 c you must ?rst ensure that pull up resistors, with a nominal value of 1k to 10k, are place d on the scl and sda communication lines coming from pins two and three of the data / power connector re spectively. data responses by the module are automatically output via rs232, in case the host will be q uerying the module, it is necessary for the host to inform the module that its responses are to be output via i 2 c. this can be done by sending command 254 /160 / 0 to turn off auto transmission of data in rs232. thi s will keep the data in the buffer until the master clocks a read of the slave. the i 2 c data lines operate at 5v normally or 3.3v for -1u style units . the LK202-25-USB uses 8-bit addressing, with the 8th or leas t signi?cant bit (lsb) bit designated as the read/write bit, a 0 designates a write address and a 1 designa tes a read address. the default read address of the display module will be 0x51, whereas the write address is 0x50 by default. this address may be changed by using cmd 254 / 51 /
. the LK202-25-USB should onl y be sent addresses that are even (lsb is 0). when the i 2 c master wishes to write to the display, the effective addres s is $50 (0101 0000) , since the lsb has to be 0 for an i 2 c master write. when the i 2 c master wishes to read the LK202-25-USB, the effective address is $51 (0101 0001), since the lsb has to be 1 for an i 2 c master read. if we take a standard phillips 7 bit address of $45 (100 0101), matrix orbital's LK202-25-USB would describe this phillips i 2 c address as $8a (1000 1010). the read address would be $8b (10 00 1011). the unit does not respond to general call address ($00). when communicating in i 2 c the LK202-25-USB will send an ack on the 9th clock cycle when ad- dressed. when writing to the display module, the display wil l respond with a ack when the write has successfully been completed. however if the buffer has been ?lled, or the module is too busy processing data it will respond with a nak. when performing a multiple by te read within one i 2 c transaction, each byte read from the slave should be followed by an ack to indica te that the master still needs data, and a matrix orbital LK202-25-USB 13
nak to indicate that the transmission is over. the LK202-25-USB has some speed limitations, especially wh en run in i 2 c mode. here are some considerations when writing i 2 c code: * to be able to read the replies of query commands (eg. cmds 54, 55) the following command must be sent (only needs to be sent once, so this can be done somewhere in init): 254 / 160 / 0 this command puts the reply data in the i 2 c output buffer instead of the rs232 output buffer. please no te that due to a 16 byte output buffer, query commands that reply with more than 16 by tes cannot be read (eg cmd get filesystem directory) * 3ms delay between the read commands * 625us delay in between data bytes within a transaction is ne cessary * 375us between transactions is necessary note these delays are consrevative, and may be decreased based on performance 4.1.2 i 2 c transaction example the typical i 2 c transaction contains four parts: the start sequence, addr essing, information, and stop sequence. to begin a transaction the data line, sda, must tog gle from high to low while the clock line, scl, is high. next, the display must be addressed using a one byte h exadecimal value, the default to write to the unit is 0x50, while read is 0x51. then information can be sent to the unit; even when reading, a command must ?rst be sent to let the unit know what type of information it is required to return. after each bit is sent, the display will issue an ack or nack as described above. fina lly, when communication is complete, the transaction is ended by toggling the data line from low to hig h while the clock line is high. an example of the use of this algorithm to write a simple hello message ca n be seen in 3. table 3: i 2 c transaction algorithm start toggle sda high to low address 0x50 information 0x48 0x45 0x4c 0x4c 0x4f stop toggle sda low to high 4.1.3 serial communication in addition to being able to communicate via i 2 c the LK202-25-USB communicates natively through the rs-232 protocol at at a default baud rate of 19,200 bps and is c apable of standard baud rates from 9600 to 115,200 bps. furthermore the LK202-25-USB is also capable o f reproducing any non-standard baud rate in between using values entered into our baud rate generation a lgorithm and set through command 164 (0xa4). the display module communicates at standard voltage levels of -30v to +30v or at ttl levels of 0 to +5v by setting the protocol select jumpers to ttl. matrix orbital LK202-25-USB 14
4.1.4 usb communication the LK202-25-USB is a usb device that offers identical commu nication protocol as the serial comport. capable of communicating via a usb interface. the usb commun ications are identical to the serial commu- nications. communication is via a virtual com port, which is created in the operating system by the drivers necessary to install the usb display. the LK202-25-USB comm unicating via usb is capable of baud rates of 19,200 bps to 115,200 bps. other baud rates are subject to t he limitation of the virtual com port driver. for further information regarding supported operating system s, and driver limitations please contact technical support. 4.2 changing the i 2 c slave address syntax hexadecimal 0xfe 0x33 [adr] decimal 254 51 [adr] ascii 254 3 [adr] parameters parameter length description adr 1 the new i 2 c write address (0x00 - 0xff). description this command sets the i 2 c write address of the module between 0x00 and 0xff. the i 2 c write address must be an even number and the read address is automatically set to one higher. for example if th e i 2 c write address is set to 0x50, then the read address is 0x51. note the change in address is immediate. remembered always default 0x50 4.3 changing the baud rate syntax hexadecimal 0xfe 0x39 [speed] decimal 254 57 [speed] ascii 254 9 [speed] parameters parameter length description speed 1 hex value corresponding to a baud rate. matrix orbital LK202-25-USB 15
description this command sets the rs-232 port to the speci?e d [speed]. the change takes place immediately. [speed] is a single byte specifyin g the desired port speed. valid speeds are shown in the table below. the dis play module can be manually reset to 19,200 baud in the event of an e rror during transmission, including transmitting a value not li sted below, by setting the manual override jumper during power up. however , it should be noted that this command will be ignored until the manual ov erride jumper is removed again. hex value baud rate 53 1200 29 2400 cf 4800 67 9600 33 19200 22 28800 19 38400 10 57600 8 115200 remembered always default 19,200 bps 4.4 setting a non-standard baud rate syntax hexadecimal 0xfe 0xa4 [speed] decimal 254 164 [speed] parameters parameter length description speed 2 inputed lsb msb from baud rate formula (12-2047). description this command sets the rs-232 port to a non-stand ard baud rate. the command accepts a two byte parameter that goes directly into the modules baud generator. use the formula, speed = crystalspeed 8 desiredbaud ? 1 to calculate the [speed] for any baud rate setting. the speed ca n be anywhere from 12 to 2047 which corresponds to a baud range of 9 77 to 153,800 baud. setting the baud rate out of this range could ca use the display to stop working properly and require the manual over ride jumper to be set. remembered always matrix orbital LK202-25-USB 16
examples crystal speed 16 mhz desired baud 13,500 speed = crystalspeed 8 ? desiredbaud ? 1 speed = 148 . 15 ? 1 speed = 16 , 000 , 000 8 ? 13 , 500 ? 1 speed = 147 . 15 ? lsb = 0x93 (rounded) ? msb = 0x00 ? intended baud rate: 13,500 baud actual baud rate: 16 , 000 , 000 8 ( 147 + 1 ) = 13,514 percent difference: 0.1% notes ? results from the formula are rounded down to the nearest whol e number (i.e 73.07 = 73). ? this formula becomes less acurate as baud rates increase, du e to rounding. ? place the speed result backwards into the formula to receive the actual baud rate. ( baud = crystalspeed 8 ( speed + 1 ) ) ? the actual baud rate must be within 3% of the intended baud rat e for the device to communicate. 5 text 5.1 introduction the LK202-25-USB is an intelligent display module, designe d to reduce the amount of code necessary to begin displaying data. this means that it is able to displa y all ascii formated characters and strings that are sent to it, which are de?ned in the current character set. the display module will begin displaying text at the top left corner of the display area, known as home, and c ontinue to print to the display as if it was a page on a typewriter. when the text reaches the bottom right r ow, it is able to automatically scroll all of the lines up and continue to display text, with the auto scroll op tion set to on. matrix orbital LK202-25-USB 17
5.1.1 character set figure 16: character set 5.1.2 control characters in addition to a full text set, the LK202-25-USB display supp orts the following ascii control characters: 0x08 backspace 0x0c clear screen / new page 0x0d carriage return 0x0a line feed / new line 5.2 auto scroll on matrix orbital LK202-25-USB 18
syntax hexadecimal 0xfe 0x51 decimal 254 81 ascii 254 q description when auto scrolling is on, it causes the display to shift the entire display's contents up to make room for a new line of text when t he text reaches the end of the last row. remembered yes default on 5.3 auto scroll off syntax hexadecimal 0xfe 0x52 decimal 254 82 ascii 254 r description when auto scrolling is disabled the text will wr ap to the top left corner of the display area when the text reaches the end of last row. remembered yes 5.4 clear screen syntax hexadecimal 0xfe 0x58 decimal 254 88 ascii 254 x description this command will immediately clear all of the c ontents of the display. remembered no 5.5 changing the startup screen syntax hexadecimal 0xfe 0x40 decimal 254 64 ascii 254 @ description in order to change the text that is displayed by t he LK202-25-USB when it starts up simply send the command bytes 254 64 followe d by the characters that you wish to display, starting from the to p left. this command will automatically line wrap the characters that ar e sent to it. remembered yes matrix orbital LK202-25-USB 19
5.6 set auto line wrap on syntax hexadecimal 0xfe 0x43 decimal 254 67 ascii 254 c description enabling auto line wrap will allow the cursor to automatically wrap over to the next line when the current line is full. note line wraps may occur in the middle of a word. remembered yes 5.7 set auto line wrap off syntax hexadecimal 0xfe 0x44 decimal 254 68 ascii 254 d description disabling auto line wrap will allow you to chang e the line con?guration. the normally sequentional progression beco mes an alternating pattern. rather than moving from line 1 to 2 to 3, the display will write from line 1 to 3 to 2. for a two line display, this mea ns that a row's worth of characters written between the ?rst and secon d lines or after the second will not be displayed on the screen or wrappe d. the four line models will see only an alteration in line ?ow. remembered yes 5.8 set cursor position syntax hexadecimal 0xfe 0x47 [col] [row] decimal 254 71 [col] [row] ascii 254 g [col] [row] parameters parameter length description col 1 column row 1 row matrix orbital LK202-25-USB 20
description this command will allow you to manually set the c ursor position, which controls the text insertion point, by specifying the [col] a nd [row] of the new proposed cursor position. note if the cursor position is set past the end of a line it will wrap to the beginning of the next line. remembered no 5.9 go home syntax hexadecimal 0xfe 0x48 decimal 254 72 ascii 254 h description this command will return the cursor to the top le ft corner of the display area, identi?ed as row one, column one. remembered no 5.10 move cursor back syntax hexadecimal 0xfe 0x4c decimal 254 76 ascii 254 l description this command will move the cursor back one space . if this command is sent when the cursor is at the home position the cursor will wr ap to the last row / column position if line wrap is on. sending this com mand will not effect the text displayed on the module, however any char acters that are sent will over write the current characters that are bein g displayed. remembered no 5.11 move cursor forward syntax hexadecimal 0xfe 0x4d decimal 254 77 ascii 254 m matrix orbital LK202-25-USB 21
description this command will move the cursor forward one sp ace. if this command is sent when the cursor is at the bottom right positio n the cursor will wrap back to the home position if line wrap is on. s ending this command will not effect the text displayed on the module , however any characters that are sent will over write the current char acters that are being displayed. remembered no 5.12 underline cursor on syntax hexadecimal 0xfe 0x4a decimal 254 74 ascii 254 j description this command will cause the LK202-25-USB to dis play an underline cursor at the current text insertion point. remembered yes 5.13 underline cursor off syntax hexadecimal 0xfe 0x4b decimal 254 75 ascii 254 k description this command will turn the the underline cursor off. remembered yes 5.14 blinking block cursor on syntax hexadecimal 0xfe 0x53 decimal 254 83 ascii 254 s description this command will cause the LK202-25-USB to dis play a block cursor at the current text insertion point. remembered yes 5.15 blinking block cursor off matrix orbital LK202-25-USB 22
syntax hexadecimal 0xfe 0x54 decimal 254 84 ascii 254 t description this command will turn the block cursor off. remembered yes 6 special characters 6.1 introduction the LK202-25-USB has the ability to create four different se ts of eight custom characters and save them to internal banks of memory. each set of eight can be recalled from memory at any time, and selected characters can be written to the display screen. characters and sets can be created at any time, saved for later use, and displayed to the screen through the intuitive comma nd structure described below. 6.2 creating a custom character syntax hexadecimal 0xfe 0x4e [refid] [data] decimal 254 78 [refid] [data] ascii 254 n [refid] [data] parameters parameter length description refid 1 character reference id (0-7). data 8 character data. matrix orbital LK202-25-USB 23
description the LK202-25-USB allows for upta to eight custo m de?ned characters to be added onto the the character set. a custom character is a ?ve by eight pixel matrix with each row represented by a byte valu e. for example: custom character 'h' decimal hex 1 0 0 0 0 16 0x10 1 0 0 0 0 16 0x10 1 0 0 0 0 16 0x10 1 0 0 0 0 16 0x10 1 0 1 1 0 22 0x16 1 1 0 0 1 25 0x19 1 0 0 0 1 17 0x11 1 0 0 0 1 17 0x11 each bit value of one, in the table, represents an on pixel, wh ereas a value of zero represents a pixel that is turned off. therefore in or der to de?ne custom character 'h' you would send the command byte pre?x 25 4 fol- lowed by the command 78. next, you will have to select the memo ry location in which you wish to save the character in. the avail able mem- ory locations for this command are zero through to seven. aft er sending the memory location, or [refid], you may then send the eight b yte custom character data in sequence from the top to the bottom. once you have de?ned a custom character you may display it by s ending the display module the [refid]. for example if a custom chara cter was saved in position one, the command to display the custom char acter, at the current cursor position, would be simply to send the numb er one to the display module without quotes. remembered no 6.3 saving custom characters syntax hexadecimal 0xfe 0xc1 [bank] [id] [data] decimal 254 193 [bank] [id] [data] parameters parameter length description bank 1 memory bank to save to (0-4). id 1 character id (0-7) data 8 character de?nition matrix orbital LK202-25-USB 24
description new to the LK202-25-USB has added ?ve non-volat ile memory banks for custom character storage. this is intended to allow you t o create your own custom bar graphs, medium/large numbers and startu p screen. however, each memory bank may be used to store a set of any eigh t custom characters; with the only provision being that memor y bank zero contains the characters that will be used in the startup scre en. by default the memory banks will be loaded as follows: [bank] description 0 startup screen characters. 1 horizontal bars 2 vertical bars 3 medium numbers in order to save new custom characters into a memory bank, fol low the same process as you would for creating a custom character, se e sec- tion 6.2 on page 23, only use 254 193 [bank number] before send ing the [id] and character [data]. remembered yes 6.4 loading custom characters syntax hexadecimal 0xfe 0xc0 [bank] decimal 254 192 [bank] parameters parameter length description bank 1 memory bank to save to (0-4). description this command is used to load the custom characte rs into the volatile memory so that they may be used. if custom bar graph or number characters are stored in the memory banks, this command may b e used instead of initializing the bar graph / number. to use this co mmand send the command bytes followed by the [bank] that contains the cu stom character data that you want to retrieve. remembered no 6.5 save startup screen custom characters syntax hexadecimal 0xfe 0xc2 [refid] [data] decimal 254 194 [refid] [data] parameters parameter length description refid 1 character reference id (0-7). data 8 character data. matrix orbital LK202-25-USB 25
description using this command you may create the custom cha racters. that will be stored in memory bank zero, which will be used in the startup s creen. for more information about creating custom characters see section 6.2 on page 23 . notes ? changes only take place once the power has been cycled. ? this command is the same as sending cmd 254 / 193 / 0 / [id] / [dat a] remembered yes 6.6 initialize medium number syntax hexadecimal 0xfe 0x6d decimal 254 109 ascii 254 m description this command will load the default medium numbe r characters into the volatile memory. if you have stored your own custom medium nu mbers, use the 'load custom characters' command to load your custom character data into the volatile memory. this command will a llow you to use the 'place medium numbers' command. remembered no 6.7 place medium numbers syntax hexadecimal 0xfe 0x6f [row] [col] [digit] decimal 254 111 [row] [col] [digit] ascii 254 o [row] [col] [digit] parameters parameter length description row 1 the row number. col 1 the column number. digit 1 medium number to place (0-9). description this command will place a medium number (two col umns high) at the [row] and [col] speci?ed. note medium numbers must be initialized before this command is ex ecuted. remembered no matrix orbital LK202-25-USB 26
6.8 initialize horizontal bar syntax hexadecimal 0xfe 0x68 decimal 254 104 ascii 254 h description this command will load the default horizontal b ar characters into the volatile memory. if you have stored your own custom horizont al bar data, use the 'load custom characters' command instead to lo ad your custom bar data into the volatile memory. this command will a llow you to use the 'place horizontal bar' command. remembered no 6.9 place horizontal bar graph syntax hexadecimal 0xfe 0x7c [col] [row] [dir] [length] decimal 254 124 [col] [row] [dir] [length] ascii 254 | [col] [row] [dir] [length] parameters parameter length description col 1 the column number. row 1 the row number. dir 1 the direction of the bar data (0 or 1). length 1 the length of the bar data. description this command will place a bar graph at [row], [co lumn]. a [dir] value of zero will cause the bar to go right, and one will cause the ba r to go left. the [length] is the size in pixels of the bar graph. notes ? horizontal bars must be initialized before this command is e xecuted. ? bar graphs may be one directional only. remembered no 6.10 initialize narrow vertical bar syntax hexadecimal 0xfe 0x73 decimal 254 115 ascii 254 s matrix orbital LK202-25-USB 27
description this command will load the narrow vertical bar c haracters into the volatile memory. if you have stored your own custom vertical bar data, use the 'load custom characters' command instead to load you r custom bar data into the volatile memory. this command will a llow you to use the 'place vertical bar' command. note narrow bars have a width of two pixels. remembered no 6.11 initialize wide vertical bar syntax hexadecimal 0xfe 0x76 decimal 254 118 ascii 254 v description this command will load the wide vertical bar cha racters into the volatile memory. if you have stored your own custom vertical bar data, use the 'load custom characters' command instead to load your custo m bar data into the volatile memory. this command will allow you to use the 'place vertical bar' command. note wide bars have a width of ?ve pixels. remembered no 6.12 place vertical bar syntax hexadecimal 0xfe 0x3d [column] [length] decimal 254 61 [column] [length] ascii 254 = [column] [length] parameters parameter length description column 1 the column number. length 1 the length of the bar data. matrix orbital LK202-25-USB 28
description this command will place a bar graph at the speci? ed [column] with the speci?ed [length]. the [length] is the size in pixels of the b ar graph. notes ? a vertical bar style must be initialized before this command is executed. ? bar graphs may be one directional only. remembered no 7 general purpose output 7.1 introduction general purpose outputs allow you to connect devices, such a s leds, to the LK202-25-USB and supply them with up to 20ma of current at 5v. the LK202-25-USB has 6 gp os which are software controlled, with functions to turn them on/off and set the power state for the next startup. 7.2 general purpose output off syntax hexadecimal 0xfe 0x56 [num] decimal 254 86 [num] ascii 254 v [num] parameters parameter length description num 1 gpo number. description this command turns off general purpose output [ num]. note off means that the output is pulled low. remembered yes 7.3 general purpose output on syntax hexadecimal 0xfe 0x57 [num] decimal 254 87 [num] ascii 254 w [num] parameters parameter length description num 1 gpo number. matrix orbital LK202-25-USB 29
description this command turns on general purpose output [n um]. the standard gpo's on the LK202-25-USB output 20ma of current at 5v. note on means the output is pulled high. remembered yes 7.4 set startup gpo state syntax hexadecimal 0xfe 0xc3 [num] [state] decimal 254 195 [num] [state] parameters parameter length description num 1 gpo number. state 1 startup state (0: off, 1: on) description this command will set the startup state for the g po on the next power up. a value of one will cause the gpo to be off on the next startu p while a value of one will cause the gpo to be on. note this command does not affect the current state of the gpo. remembered always 8 dallas 1-wire 8.1 introduction another convenient feature of the LK202-25-USB is that it pr ovides a dallas 1-wire interface in order to readily communicate with up to thirty two 1-wire devices on a single bus. 1-wire communication is begun by discovering the address of the device that you wish to comm unicate with. to do this you must send the search for a 1-wire device' command. after you have establi shed the address of the device that you wish to communicate with, you may begin a transaction with the dev ice 8.2 search for a 1-wire device syntax hexadecimal 0xfe 0xc8 0x2 decimal 254 200 2 matrix orbital LK202-25-USB 30
description this command will allow you to begin communicat ing with the devices on the 1-wire bus by returning a packet containing device inf ormation for each 1-wire device on the bus in the form of: search return packet offset (bytes) offset (bytes) description 0 2 0x232a preamble 2 1 0x8a packet is 10 bytes long, an- other address will follow 0x0a packet is 10 bytes long, this is the last address 3 1 0x31 - 1-wire packet type 4 1 error code (0x00 for success) 5 8 1-wire address 13 1 crc8 0x00 means the last address was valid remembered no 8.3 dallas 1-wire transaction syntax hexadecimal 0xfe 0xc8 0x1 [?ags] [sndbits] [rcvbits] [data ] decimal 254 200 1 [?ags] [sndbits] [rcvbits] [data] parameters parameter length description ?ags 1 flags to control optional components of the transaction. sndbits 1 the number of bits you will be transmitting on the bus. rcvbits 1 the number of bits you will be reading on the bus. data variable data to be transmitted, lsb to msb. matrix orbital LK202-25-USB 31
description this command will perform a single transaction on the 1-wire bus in this order: 1. bus reset. 2. transmit data onto the bus. 3. receive data from the bus. the number of bits to be transmitted and read must be speci?ed for this command to be successful. note to determine what functions the device will respond to, cons ult the devices' data sheet. 1-wire flags bit description 7 6 unused 5 (0 for future compatibility) 4 3 add a crc8 to the end of the transmitted data 2 (0 for future compatibility) 1 assume last received byte is a crc8 and validate it 0 reset bus before transaction 1-wire error codes code description 0x00 success 0x01 unknown 1-wire command 0x02 no devices on the bus 0x03 fatal search error remembered no 9 keypad 9.1 introduction the LK202-25-USB supports up to a 25 key, matrix style, keypa d and may be con?gured to allow key presses to be automatically transmitted via usb. the lk202- 25-usb also allows for auto-repeating key presses, and remapping of all keypad character codes. the connector is not keyed so the keypad will probably plug in either of two ways. the display will not be damaged by reversing the connector. however, the keyp ad will generate a different ascii character mapping for each position. if the connector has fewer than 10 pins it should be centered on the display matrix orbital LK202-25-USB 32
connector. the keypad is scanned whenever a key is pressed;t here is no continuous key scan. this means that key presses are dealt with immediately without any appr eciable latency. this also prevents electrical noise which is often caused by continuous key scans. 9.2 auto transmit key presses on syntax hexadecimal 0xfe 0x41 decimal 254 65 ascii 254 a description in this mode, all key presses are sent immediate ly to the host system without the use of the poll keypad command. this is the defaul t mode on power up. remembered yes default on 9.3 auto transmit key presses off syntax hexadecimal 0xfe 0x4f decimal 254 79 ascii 254 o description in this mode, up to 10 key presses are buffered un til the unit is polled by the host system, via the poll keypad command 254 38. issuing t his command places the unit in polled mode. remembered yes 9.4 poll key press syntax hexadecimal 0xfe 0x26 decimal 254 38 ascii 254 & matrix orbital LK202-25-USB 33
description this command returns any buffered key presses v ia the serial interface. the host system must be set up to receive key codes. when the di splay receives this command, it will immediately return any buffe red key presses which may have not been read already. if there is more than one key press buffered, then the high order bit (msb) of the retur ned key code will be set (1). if this is the only buffered key press, th en the msb will be cleared (0). if there are no buffered key presses, the n the returned code will be 0x00. please note that to make use of thi s command, the auto transmit key presses mode should be off. remembered no 9.5 clear key buffer syntax hexadecimal 0xfe 0x45 decimal 254 69 ascii 254 e description this command clears any unread key presses. in a menu application, if the user presses a key which changes the menu context, any fol lowing key presses may be inaccurate and can be cleared out of the buf fer between menu changes to prevent jumping around the menu tree . it may also be used, in effect, to reset the keypad in case the host ap plication resets for whatever reason. remembered no 9.6 set debounce time syntax hexadecimal 0xfe 0x55 [time] decimal 254 85 [time] ascii 254 u [time] parameters parameter length description time 1 debounce time in increments of 6.554ms (0 - 255). description this command sets the time between key press and key read. all key types with the exception of latched piezo switches will 'bou nce' for a varying time, depending on their physical characteristics . the [time] value is in increments of 6.554ms. the default debounce time for the module is 8 (about 52ms), which is adequate for most membrane keypads. remembered yes default 8 matrix orbital LK202-25-USB 34
9.7 set auto repeat mode syntax hexadecimal 0xfe 0x7e [mode] decimal 254 126 [mode] ascii 254 ~ [mode] parameters parameter length description mode 1 auto repeat mode (0: resend key , 1: key up/down) description two auto repeat modes are available and are set v ia the same command: ? resend key mode: 0x00 ? key up/down mode: 0x01 resend key mode this mode is similar to the action of a keyboard on a pc. in this mode, when a key is held down, the key code is transmitted immediately followed by a 1/2 second delay. aft er this delay, key codes will be sent via the rs-232 interface at a rate of about 5 codes per second. this mode has no effect if polling or if using the i 2 c interface. key up/down mode this mode may be used when the typematic parameters of the resend key code mode are unacceptable or if the unit is being operated in polled mode. the host system detects the press of a key and simulates an auto repeat inside the host system until the key release is detected. in this mode, w hen a key is held down, the key code is transmitted immediately and no other codes will be sent until the key is released. on the rele ase of the key, the key release code transmitted will be a value equa l to the key down code plus 20 hex. remembered yes examples when the key code associated with key 'p' (0x50) is p ressed, the release code is 'p' (0x70). in rs-232 polled mode or via the i 2 c, the key down / key up codes are used; however, the user should be care ful of timing details. if the poll rate is slower than the simulated auto-repeat it is possible that polling for a key up code will be delayed long enough for an unwanted key repeat to be generated. 9.8 auto repeat mode off syntax hexadecimal 0xfe 0x60 decimal 254 96 ascii 254 ` matrix orbital LK202-25-USB 35
description this command turns auto repeat mode off. see set auto repeat mode. remembered no 9.9 assign keypad codes syntax hexadecimal 0xfe 0xd5 [kdown] [kup] decimal 254 213 [kdown] [kup] parameters parameter length description kdown 25 key down codes kup 25 key up codes description this command will allow you to reassign the key c odes that correspond to the key presses on the matrix style key pad. the ?rst 25 byte s that are transmitted will be used for the key down codes and the next 25 bytes that are transmitted will be used for the key up codes. key down 1 2 3 4 5 1 a b c d e 2 f g h i j 3 k l m n o 4 p q r s t 5 u v w x y key up 1 2 3 4 5 1 a b c d e 2 f g h i j 3 k l m n o 4 p q r s t 5 u v w x y remembered always 10 display functions 10.1 introduction the LK202-25-USB employs software controlled display sett ings, which allow for control over, clearing the screen, changing the brightness and contrast or setting timers for turning it on or off. the combination of these allow you complete software control over your displ ay's appearance. 10.2 display on syntax hexadecimal 0xfe 0x42 [min] decimal 254 66 [min] ascii 254 b [min] parameters parameter length description min 1 minutes before turning the display on (0 to 90). matrix orbital LK202-25-USB 36
description this command turns the backlight on after the [m inutes] timer has expired, with a ninety minute maximum timer. a time of 0 speci ?es that the backlight should turn on immediately and stay on. when th is command is sent while the remember function is on, the timer w ill reset and begin after power up. remembered yes default 0 10.3 display off syntax hexadecimal 0xfe 0x46 decimal 254 70 ascii 254 f description this command turns the backlight off immediate ly. the backlight will remain off until a 'display on' command has been received. remembered yes 10.4 set brightness syntax hexadecimal 0xfe 0x99 [brightness] decimal 254 153 [brightness] parameters parameter length description brightness 1 display brightness setting (0 to 255). description this command sets the display [brightness]. if the remember function is on, this command acts the same as 'set and save brightness'. remembered yes default 255 10.5 set and save brightness syntax hexadecimal 0xfe 0x98 [brightness] decimal 254 152 [brightness] parameters parameter length description brightness 1 backlight setting (0 to 255). description this command sets and saves the display [bright ness] as default. remembered always matrix orbital LK202-25-USB 37
10.6 set contrast syntax hexadecimal 0xfe 0x50 [contrast] decimal 254 80 [contrast] ascii 254 p [contrast] parameters parameter length description contrast 1 contrast value (0 to 255). description this command sets the display's contrast to [co ntrast], where [contrast] is a value between 0x00 and 0xff (between 0 to 255). lower valu es cause `on' elements in the display area to appear lighter, wh ile higher values cause `on' elements to appear darker. lighting and te mperature conditions will affect the actual value used for optimal vie wing. individual display modules will also differ slightly from e ach other in appearance. in addition, values for optimal viewing while t he display backlight is on may differ from values used when backlight is off. this command does not save the [contrast] value, and is lost a fter power down; but this command has the option of remembering the sett ings when issued with the remember function `on' . when this is the case, this command is the same as the set and save contrast command. note this command has only 32 levels for x-board based displays, m eaning eight contrast settings will have the same single effect. efectiv ely, values 0 through 7, 8 through 15, and so on will result in the same setting. remembered yes default 128 10.7 set and save contrast syntax hexadecimal 0xfe 0x91 [contrast] decimal 254 145 [contrast] parameters parameter length description contrast 1 contrast value (0 to 255). matrix orbital LK202-25-USB 38
description this command sets the display's contrast to [co ntrast], where [contrast] is a value between 0x00 and 0xff (between 0 to 255). lower valu es cause `on' elements in the display area to appear lighter, wh ile higher values cause `on' elements to appear darker. lighting condi tions will affect the actual value used for optimal viewing. individua l display modules will also differ slightly from each other in appeara nce. in addition, values for optimal viewing while the display back light is on may differ from values used when backlight is off. note this command saves the [contrast] value so that it is not lost after power down. remembered yes default 128 11 data security 11.1 introduction ensuring that your LK202-25-USB display's exactly what you want it to can be the difference between a projects success and failure. this is why we incorporate fea tures such as data lock into the LK202-25-USB with this new feature you now are in control over of how and whe n settings will be changed so there is no need to worry about the module acting exactly like you expect ed it to because all the settings may be locked and remembered for the next power up. 11.2 set remember syntax hexadecimal 0xfe 0x93 [switch] decimal 254 147 [switch] parameters parameter length description switch 1 0: do not remember, 1: remember matrix orbital LK202-25-USB 39
description this command allows you to switch the remember f unction on and off. to use the remember function, set remember to on, then set all of the settings that you wish to save, settings that are listed as 'r emember: yes' support being saved into the non-volatile memory. afte r you have set all of the commands that you wish to save, you may then cycl e the power and check the display settings to ensure that all the se ttings have been saved. if you wish to use remember again after cycling th e power, you must set it to on again. notes ? writing to non-volatile memory is time consuming and slows d own the operation of the display. ? non-volatile memory has a `write limit' and may only be chang ed approximately 100,000 times. remembered no default do not remember 11.3 data lock syntax hexadecimal 0xfe 0xca 0xf5 0xa0 [level] decimal 254 202 245 160 [level] parameters parameter length description level 1 sets the data lock level matrix orbital LK202-25-USB 40
description paranoia allows you to lock the module from displaying infor mation, as well as enables the protection of the ?lesystem and module se ttings. each bit corresponds corresponds to a different lock level, while sending a zero will unlock your display as the following tabl es explains: bit data lock level description 0-2 reserved should be left 0 3 communication speed lock when this bit is set (1) the baud rate and i 2 c slave address are locked 4 setting lock when this bit is set (1) the display settings such as backlight, contrast and gpo settings are locked. (internal eeprom) 5 reserved should be left 0 6 command lock when this bit is set (1) all commands but commands 202/203 are locked. (cmd lock) 7 display lock when this bit is set (1) the module is locked from dis- playing any new informa- tion. (text lock) notes ? sending a new data lock level will override the previous data lock level. ? data lock levels may be combined. remembered always default 0 examples hex dec binary description 0x00 0 0 unlock 0x50 80 01010000 setting and command lock 11.4 set and save data lock syntax hexadecimal 0xfe 0xcb 0xf5 0xa0 [level] decimal 254 203 245 160 [level] matrix orbital LK202-25-USB 41
parameters parameter length description level 1 sets the data lock level description this command will set and save the data lock leve l. see the data lock section for more information. remembered always default 0 11.5 write customer data syntax hexadecimal 0xfe 0x34 [data] decimal 254 52 [data] ascii 254 4 [data] parameters parameter length description data 16 writes the customer data description writes the customer data. 16 bytes of data can be saved in non-volatile memory. remembered no 11.6 read customer data syntax hexadecimal 0xfe 0x35 decimal 254 53 ascii 254 5 description reads whatever was written by write customer da ta. remembered no 12 miscellaneous 12.1 introduction this chapter covers the 'report version number' and 'read mo dule type' commands. these commands can be particularly useful to ?nd out more information about the display module before contacting technical support. 12.2 read version number matrix orbital LK202-25-USB 42
syntax hexadecimal 0xfe 0x36 decimal 254 54 ascii 254 6 description this command will return a byte representing th e version of the module, see the following table as an example: hex value version number 0x19 version 1.9 0x57 version 5.7 remembered no 12.3 read module type syntax hexadecimal 0xfe 0x37 decimal 254 55 ascii 254 7 matrix orbital LK202-25-USB 43
description this command will return a hex value correspond ing to the the model number of the module see the following table: hex product id hex product id 1 lcd0821 2 lcd2021 5 lcd2041 6 lcd4021 7 lcd4041 8 lk202-25 9 lk204-25 a lk404-55 b vfd2021 c vfd2041 d vfd4021 e vk202-25 f vk204-25 10 glc12232 13 glc24064 14 unused 15 glk24064-25 16 unused 21 unused 22 glk12232-25 23 unused 24 glk12232-25-sm 25 glk24064-16-1u-usb 26 glk24064-16-1u 27 glk19264-7t-1u-usb 28 glk12232-16 29 glk12232-16-sm 2a glk19264-7t-1u 2b lk204-7t-1u 2c lk204-7t-1u-usb 31 lk404-at 32 mos-av-162a 33 lk402-12 34 lk162-12 35 lk204-25pc 36 lk202-24-usb 37 vk202-24-usb 38 lk204-24-usb 39 vk204-24-usb 3a pk162-12 3b vk162-12 3c mos-ap-162a 3d pk202-25 3e mos-al-162a 3f mos-al-202a 40 mos-av-202a 41 mos-ap-202a 42 pk202-24-usb 43 mos-al-082 44 mos-al-204 45 mos-av-204 46 mos-al-402 47 mos-av-402 48 lk082-12 49 vk402-12 4a vk404-55 4b lk402-25 4c vk402-25 4d pk204-25 4e unused 4f mos 50 moi 51 xboard-s 52 xboard-i 53 mou 54 xboard-u 55 LK202-25-USB 56 vk202-25-usb 57 lk204-25-usb 58 vk204-25-usb 5b lk162-12-tc 5c unused 71 unused 72 glk240128-25 73 lk404-25 74 vk404-25 77 unused 78 glt320240 79 glt480282 7a glt240128 remembered no matrix orbital LK202-25-USB 44
13 command summary 13.1 communications description syntax page changing the i 2 c slave address hexadecimal 0xfe 0x33 [adr] decimal 254 51 [adr] ascii 254 3 [adr] 15 changing the baud rate hexadecimal 0xfe 0x39 [speed] decimal 254 57 [speed] ascii 254 9 [speed] 15 setting a non-standard baud rate hexadecimal 0xfe 0xa4 [speed] decimal 254 164 [speed] 16 13.2 text description syntax page auto scroll on hexadecimal 0xfe 0x51 decimal 254 81 ascii 254 q 18 auto scroll off hexadecimal 0xfe 0x52 decimal 254 82 ascii 254 r 19 clear screen hexadecimal 0xfe 0x58 decimal 254 88 ascii 254 x 19 changing the startup screen hexadecimal 0xfe 0x40 decimal 254 64 ascii 254 @ 19 set auto line wrap on hexadecimal 0xfe 0x43 decimal 254 67 ascii 254 c 20 set auto line wrap off hexadecimal 0xfe 0x44 decimal 254 68 ascii 254 d 20 set cursor position hexadecimal 0xfe 0x47 [col] [row] decimal 254 71 [col] [row] ascii 254 g [col] [row] 20 go home hexadecimal 0xfe 0x48 decimal 254 72 ascii 254 h 21 matrix orbital LK202-25-USB 45
description syntax page move cursor back hexadecimal 0xfe 0x4c decimal 254 76 ascii 254 l 21 move cursor forward hexadecimal 0xfe 0x4d decimal 254 77 ascii 254 m 21 underline cursor on hexadecimal 0xfe 0x4a decimal 254 74 ascii 254 j 22 underline cursor off hexadecimal 0xfe 0x4b decimal 254 75 ascii 254 k 22 blinking block cursor on hexadecimal 0xfe 0x53 decimal 254 83 ascii 254 s 22 blinking block cursor off hexadecimal 0xfe 0x54 decimal 254 84 ascii 254 t 22 13.3 special characters description syntax page creating a custom character hexadecimal 0xfe 0x4e [refid] [data] decimal 254 78 [refid] [data] ascii 254 n [refid] [data] 23 saving custom characters hexadecimal 0xfe 0xc1 [bank] [id] [data] decimal 254 193 [bank] [id] [data] 24 loading custom characters hexadecimal 0xfe 0xc0 [bank] decimal 254 192 [bank] 25 save startup screen custom characters hexadecimal 0xfe 0xc2 [refid] [data] decimal 254 194 [refid] [data] 25 initialize medium number hexadecimal 0xfe 0x6d decimal 254 109 ascii 254 m 26 place medium numbers hexadecimal 0xfe 0x6f [row] [col] [digit] decimal 254 111 [row] [col] [digit] ascii 254 o [row] [col] [digit] 26 initialize horizontal bar hexadecimal 0xfe 0x68 decimal 254 104 ascii 254 h 27 place horizontal bar graph hexadecimal 0xfe 0x7c [col] [row] [dir] [length] decimal 254 124 [col] [row] [dir] [length] ascii 254 | [col] [row] [dir] [length] 27 matrix orbital LK202-25-USB 46
description syntax page initialize narrow vertical bar hexadecimal 0xfe 0x73 decimal 254 115 ascii 254 s 27 initialize wide vertical bar hexadecimal 0xfe 0x76 decimal 254 118 ascii 254 v 28 place vertical bar hexadecimal 0xfe 0x3d [column] [length] decimal 254 61 [column] [length] ascii 254 = [column] [length] 28 13.4 general purpose output description syntax page general purpose output off hexadecimal 0xfe 0x56 [num] decimal 254 86 [num] ascii 254 v [num] 29 general purpose output on hexadecimal 0xfe 0x57 [num] decimal 254 87 [num] ascii 254 w [num] 29 set startup gpo state hexadecimal 0xfe 0xc3 [num] [state] decimal 254 195 [num] [state] 30 13.5 dallas 1-wire description syntax page search for a 1-wire device hexadecimal 0xfe 0xc8 0x2 decimal 254 200 2 30 dallas 1-wire transaction hexadecimal 0xfe 0xc8 0x1 [?ags] [sndbits] [rcvbits] [data ] decimal 254 200 1 [?ags] [sndbits] [rcvbits] [data] 31 13.6 keypad description syntax page auto transmit key presses on hexadecimal 0xfe 0x41 decimal 254 65 ascii 254 a 33 auto transmit key presses off hexadecimal 0xfe 0x4f decimal 254 79 ascii 254 o 33 matrix orbital LK202-25-USB 47
description syntax page poll key press hexadecimal 0xfe 0x26 decimal 254 38 ascii 254 & 33 clear key buffer hexadecimal 0xfe 0x45 decimal 254 69 ascii 254 e 34 set debounce time hexadecimal 0xfe 0x55 [time] decimal 254 85 [time] ascii 254 u [time] 34 set auto repeat mode hexadecimal 0xfe 0x7e [mode] decimal 254 126 [mode] ascii 254 ~ [mode] 35 auto repeat mode off hexadecimal 0xfe 0x60 decimal 254 96 ascii 254 ` 35 assign keypad codes hexadecimal 0xfe 0xd5 [kdown] [kup] decimal 254 213 [kdown] [kup] 36 13.7 display functions description syntax page display on hexadecimal 0xfe 0x42 [min] decimal 254 66 [min] ascii 254 b [min] 36 display off hexadecimal 0xfe 0x46 decimal 254 70 ascii 254 f 37 set brightness hexadecimal 0xfe 0x99 [brightness] decimal 254 153 [brightness] 37 set and save brightness hexadecimal 0xfe 0x98 [brightness] decimal 254 152 [brightness] 37 set contrast hexadecimal 0xfe 0x50 [contrast] decimal 254 80 [contrast] ascii 254 p [contrast] 38 set and save contrast hexadecimal 0xfe 0x91 [contrast] decimal 254 145 [contrast] 38 13.8 data security description syntax page set remember hexadecimal 0xfe 0x93 [switch] decimal 254 147 [switch] 39 matrix orbital LK202-25-USB 48
description syntax page data lock hexadecimal 0xfe 0xca 0xf5 0xa0 [level] decimal 254 202 245 160 [level] 40 set and save data lock hexadecimal 0xfe 0xcb 0xf5 0xa0 [level] decimal 254 203 245 160 [level] 41 write customer data hexadecimal 0xfe 0x34 [data] decimal 254 52 [data] ascii 254 4 [data] 42 read customer data hexadecimal 0xfe 0x35 decimal 254 53 ascii 254 5 42 13.9 miscellaneous description syntax page read version number hexadecimal 0xfe 0x36 decimal 254 54 ascii 254 6 42 read module type hexadecimal 0xfe 0x37 decimal 254 55 ascii 254 7 43 13.10 command by number command description page hex dec ascii 0x26 38 & poll key press 33 0x33 51 3 changing the i 2 c slave address 15 0x34 52 4 write customer data 42 0x35 53 5 read customer data 42 0x36 54 6 read version number 42 0x37 55 7 read module type 43 0x39 57 9 changing the baud rate 15 0x3d 61 = place vertical bar 28 0x40 64 @ changing the startup screen 19 0x41 65 a auto transmit key presses on 33 0x42 66 b display on 36 0x43 67 c set auto line wrap on 20 0x44 68 d set auto line wrap off 20 0x45 69 e clear key buffer 34 0x46 70 f display off 37 0x47 71 g set cursor position 20 0x48 72 h go home 21 matrix orbital LK202-25-USB 49
command description page hex dec ascii 0x4a 74 j underline cursor on 22 0x4b 75 k underline cursor off 22 0x4c 76 l move cursor back 21 0x4d 77 m move cursor forward 21 0x4e 78 n creating a custom character 23 0x4f 79 o auto transmit key presses off 33 0x50 80 p set contrast 38 0x51 81 q auto scroll on 18 0x52 82 r auto scroll off 19 0x53 83 s blinking block cursor on 22 0x54 84 t blinking block cursor off 22 0x55 85 u set debounce time 34 0x56 86 v general purpose output off 29 0x57 87 w general purpose output on 29 0x58 88 x clear screen 19 0x60 96 ` auto repeat mode off 35 0x68 104 h initialize horizontal bar 27 0x6d 109 m initialize medium number 26 0x6f 111 o place medium numbers 26 0x73 115 s initialize narrow vertical bar 27 0x76 118 v initialize wide vertical bar 28 0x7c 124 | place horizontal bar graph 27 0x7e 126 ~ set auto repeat mode 35 0x91 145 set and save contrast 38 0x93 147 set remember 39 0x98 152 set and save brightness 37 0x99 153 set brightness 37 0xa4 164 setting a non-standard baud rate 16 0xc0 192 loading custom characters 25 0xc1 193 saving custom characters 24 0xc2 194 save startup screen custom characters 25 0xc3 195 set startup gpo state 30 0xc8 200 dallas 1-wire transaction 31 0xca 202 data lock 40 matrix orbital LK202-25-USB 50
14 appendix 14.1 speci?cations 14.1.1 environmental table 68: environmental speci?cations standard temperature extended temperature operating temperature 0 ? c to +50 ? c -20 ? c to +70 ? c storage temperature -20 ? c to +70 ? c -30 ? c to +80 ? c operating relative humidity 90% max non-condensing vibration (operating) 4.9 m/s 2 xyz directions vibration (non-operating) 19.6 m/s 2 xyz directions shock (operating) 29.4 m/s 2 xyz directions shock (non-operating) 490 m/s 2 xyz directions 14.1.2 electrical table 69: electrical speci?cations supply voltage +5vdc 0.25v minimum current 45ma typical backlight on (yg, iy & fy) add 130ma (175 ma) typical backlight on (r, fg & fa) add 150ma (195 ma) typical backlight on (gw, wb, fw & fb) add 60ma (105 ma) typical 14.2 optical characteristics table 70: optical characteristics character x lines 20 columns x 2 rows module size 116.00 mm x 37.00 mm x 27.7 mm character size 3.20 mm x 5.55 mm active area 75.50 mm x 11.50 mm led backlight half-life (yg, iy & fy) 50,000 hours typical led backlight half-life(r, fg & fa) 20,000 hours typical led backlight half-life (gw, wb, fw & fb) 10,000 hours typical matrix orbital LK202-25-USB 51
note to prolong life, it is recommended that the backlight be turn ed off when the display is not in use. matrix orbital LK202-25-USB 52
14.3 physical layout figure 17: physical diagram matrix orbital LK202-25-USB 53
14.4 ordering information l k 20 2 -25 -usb -fw -e 1 2 3 4 5 6 7 8 table 71: part numbering scheme # description options 1 screent type l: liquid crystal display* 2 input type k: external keypad 3 width 20: twenty character columns 4 height 2: two character rows 5 keypad buttons -25: twenty-five key input maximum 6 protocol -usb: universal serial bus only 7 color (text/background) np: standard grey/yellow-green -gw: grey/white -wb: white/blue -r: red/black -iy: yellow/black (stn) -fa: amber/black -fb: blue/black -fg: green/black -fw: white/black -fy: yellow/black (ffstn) 8 temperature np: standard (0 ? c to +50 ? c) -e: extended temperature (-20 ? c to +70 ? c) table 72: part options note * also available with a vacuum florescent display in thevk20 2-25-usb model 14.5 de?nitions e extended temperature (-20c to 70c) gw grey text / white background wb white text / blue background r inverse red iy inverse yellow matrix orbital LK202-25-USB 54
fa ffstn inverse amber fb ffstn inverse blue fg ffstn inverse green fw ffstn inverse white fy ffstn inverse yellow msb most signi?cant byte lsb least signi?cant byte 14.6 contacting matrix orbital telephone sales: 1(403)229-2737 support: 1(403)204-3750 on the web sales: http://www.matrixorbital.com support: http://www.matrixorbital.ca forums: http://www.lcdforums.com 14.7 revision history table 73: revision history revision description author 1.0 initial manual clark 1.1 updated backlight life clark matrix orbital LK202-25-USB 55


▲Up To Search▲   

 
Price & Availability of LK202-25-USB

All Rights Reserved © IC-ON-LINE 2003 - 2022  

[Add Bookmark] [Contact Us] [Link exchange] [Privacy policy]
Mirror Sites :  [www.datasheet.hk]   [www.maxim4u.com]  [www.ic-on-line.cn] [www.ic-on-line.com] [www.ic-on-line.net] [www.alldatasheet.com.cn] [www.gdcy.com]  [www.gdcy.net]


 . . . . .
  We use cookies to deliver the best possible web experience and assist with our advertising efforts. By continuing to use this site, you consent to the use of cookies. For more information on cookies, please take a look at our Privacy Policy. X